Get file creation and modification date/timesΒΆ
Get file creation and modification date/times.
import os.path, time
print("Last modified: %s" % time.ctime(os.path.getmtime("test.txt")))
print("Created: %s" % time.ctime(os.path.getctime("test.txt")))
Output:
Last modified: Wed Oct 19 11:36:23 2018
Created: Wed Oct 19 11:36:23 2018